<!DOCTYPE html>
<html>

<head>
    <title>数据源测试</title>
    <script type="text/javascript">
        window.ctx=""
    </script>
    <style type="text/css">
    [ng-cloak]{
        display: none
    }
    </style>
</head>

<body ng-controller="DSController" >
    <h1>Hello world</h1>
    <button ng-click="nextPage()">增加页数</button>
    <button ng-click="setParams()">设置参数</button>
    <button ng-click="setPageSize()">设置分页大小</button>
    <button ng-click="fresh()">请求数据</button>

    <hr>
    <br>
    参数项：
    名称:<input type="text" ng-model="testParams.username"/>
    编号:<input type="text" ng-model="testParams.usernm"/>
    <hr>
    <g-data-source 
    url="/sebusiness/student"
    page-size="10" 
    current-page="1" 
    data-params="testParams"  
    data-source-name="source1"
    page="true"
    current-page-param="currentPage"
    allow-auto-load="true"
    allow-param-depth-listener="false"
    >
    </g-data-source>




    <g-data-source 
    url="/sebusiness/student"
    page-size="10" 
    current-page="1"
    data-params="testParams" 
    data-source-name="source2">
    </g-data-source>
    <div ng-repeat="item in dataSources.source1.records" ng-cloak>
        {{item}}
    </div>


    <br>
    <br>
    <br>
    <hr>
    <button ng-click="changeCustomerDataSource()">修改自定义数据源</button>
    <div ng-repeat="item in dataSources.source3.records" ng-cloak>
        {{item}}
    </div>

    <script data-main="/static/app.js" type="text/javascript" src="/bower_components/requirejs/require.js" data-bootstrap-modules="'demo/datasource/TestDataSourceModule'"></script>
</body>

</html>
